//
//  FactoryAnimal.m
//  FactoryMode
//
//  Created by xalo on 16/6/29.
//  Copyright © 2016年 蓝鸥科技有限公司西安分公司. All rights reserved.
//

#import "FactoryAnimal.h"

@implementation FactoryAnimal


+ (Animal *)createAnimalWithType:(NSString *)type{
    //多态 父类指针指向子类对象
    Animal *animal=[[NSClassFromString(type) alloc]init];
    [animal laungh];
    
    return animal;
}
@end
   